var app = angular.module('myApp', []);
/*app.service("hexafy", function () {
 this.myFunc() = function (x) {
 return x.toString(16);
 }
 });*/
app.controller('personCtrl', function ($scope, $location, $http, $timeout, $interval) {
    $scope.lastName = "some to do";
    $scope.myUrl = $location.absUrl();
    $http.get("http://shannanhong.github.io/").then(function (response) {
        $scope.myWelcome = response.data;
    });
    $http.get("welcome.htm").then(function (response) {
        $scope.myDoc = response.data;
    });
    $timeout(function () {
        $scope.myDoc = "How are you today!";

    }, 3000);
    $scope.theTime = new Date().toLocaleTimeString();
    $interval(function () {
        $scope.theTime = new Date().toLocaleTimeString();
    }, 1000);
    $http.get("jsonData.php").success(function (response) {
        $scope.names = response.records;
    })

    $scope.sites = [{site: "Google", url: "1"}, {site: "taoBao", url: "2"}, {site: "Sun", url: "3"}];
});
